<template>
	<view class="fun-flex-col fun-items-center fun-justify-between page">
		<view class="fun-flex-col fun-items-center">
			<image class="image_4" src="@/static/login/success.png" />
			<text class="fun-self-center text_3">Success</text>
			<text class="fun-self-center text_4">{{tips}}</text>
		</view>
		
		<viwe class="fun-flex-col fun-items-center sub-wrap">
			<view class="fun-flex-row fun-items-center sub" v-if="subTips">
				<image src="@/static/common/tips.png"></image>
				<text>{{subTips}}</text>
			</view>
			<view class="text-wrapper fun-self-end" @click="done">{{btnText}}</view>
		</viwe>
		
	</view>
</template>

<script>
	export default {
		components: {},
		props: {},
		data() {
			return {
				tips:"",
				btnText:"",
				backUrl:"",
				subTips:"",
				pageType:""
			};
		},
		
		onLoad(option) {
			this.tips = option.tips;
			this.subTips = option.subTips;
			this.btnText = option.btnText;
			this.backUrl = option.backUrl;
			this.pageType = option.pageType;
		},

		methods: {
			done(){
				if(this.pageType == "tab"){
					uni.switchTab({url:this.backUrl})
				}
				else{
					uni.navigateTo({url:this.backUrl})
				}
			}
		},
	};
</script>

<style scoped lang="scss">
	.page {
		padding: 268rpx 56rpx 48rpx 56rpx;
		background-color: #ffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
		.image_4 {
			width: 180rpx;
			height: 180rpx;
		}
		.text_3 {
			margin-top: 48rpx;
			margin-bottom: 24rpx;
			color: #15141F;
			font-size: 48rpx;
			font-family: Manrope;
			font-weight: 800;
		}

		.text_4 {
			color: #A2A0A8;
			font-size: 36rpx;
			font-family: SF Pro Display;
			text-align: center;
		}
		.sub-wrap{
			width: 100%;
			.sub{
				margin-bottom: 48rpx;
				image{
					width: 40rpx;
					height: 40rpx;
				}
				text{
					margin-left: 16rpx;
					flex:1;
					font-size: 24rpx;
					color: #7F7F7F;
					line-height: 28rpx;
				}
			}
			.text-wrapper {
				width: 100%;
				text-align: center;
				padding: 20rpx 0;
				background-color: #1a7b99;
				border-radius: 8rpx;
				color: #ffffff;
				font-size: 28rpx;
				font-weight: 700;
			}
		}
		
	}
</style>